
<div id="footer">
    <ul class="footer-links">
       <?php 
       //$test = $this->session->all_userdata();
       $test = $this->session->all_userdata();
       //echo $test['user_level'];
        if(isset($test['user_level'])) {
            // Neu co SESSION
            switch($test['user_level']) {
                case 0: // Registered users access
                ?>
                    <li><a href='#'>User Profile</a></li>
                    <li><a href='#'>Change Password</a></li>
                    <li><a href='<?php echo base_url('/c_user/logout');?>'>Log Out</a></li>
                <?php
                break;
                case 2: // Admin access
                ?>
                    <li><a href='#'>User Profile</a></li>
                    <li><a href='<?php echo base_url('/c_user/manager');?>'>Manager</a></li>
                    <li><a href='<?php echo base_url('/c_user/logout');?>'>Log Out</a></li>
                <?php
                break;
                
                default:
                ?>
                    <li><a href='<?php echo base_url('c_homepage');?>'>Home</a></li>
                    <li><a href='<?php echo baseurl('c_user/register');?>'>Register</a></li>
                    <li><a href='<?php echo base_url('/c_user/login');?>'>Login</a></li>
                <?php
                break;
            }
            
        } else {
            ?>
                    <li><a href='<?php echo base_url('c_homepage');?>'>Home</a></li>
                    <li><a href='<?php echo base_url('c_user/register');?>'>Register</a></li>
                    <li><a href='<?php echo base_url('/c_user/login');?>'>Login</a></li>
               
        <?php }
       ?>
    </ul>
</div><!--end footer-->
</div> <!-- end content-container-->
</div> <!--end container-->
</body>
</html>